import type { SearchParams } from "@/api/erc/spareParts/signboard";

export type PanelType = "health" | "typeTrend";

export type Params = Omit<SearchParams, "startTime" | "endTime" | "parentCode"> & {
  date: [string, string];
};

interface DataType {
  name: string;
  type: string;
  data: number[];
}

export type InAndOutCountType<T> = {
  xData: string[];
  yData: DataType[];
  dayTrend: Record<string, T> | null;
};

export type LevelType = "MONTH" | "DAY";

export type InAndOutCountTypeReverse = {
  xData: DataType[];
  yData: string[];
};

export type HeightType = "300px" | "600px";

export type PropsTypeForPanel<T> = {
  isTop: boolean;
  data: T;
};

export type EmitsTypeForPanel = {
  (e: "enlarge" | "back", type: PanelType): void;
  (e: "pushCode", code: string): void;
  (e: "getData", isTop: boolean): void;
  (e: "reset"): void;
};

export type PropsTypeForHealthAndType<T> = {
  data: T;
  showTop5Data: boolean;
};

export type EmitsTypeForHealthAndType = {
  (e: "getData", isTop: boolean): void;
  (e: "pushCode", code: string): void;
  (e: "resetCode"): void;
};
